import extraConfigEvent from '@/common/extra-config-event.js';
import { EMIT_PARAMS_OBJ } from '@/utils/constant';
import { $demoi18n } from '@/utils/lang';

export default {
  isCustomProertyPannel: true,
  propertyPannelName: `config_${process.env.xvueNameSpace_}layer_switching_3d`,
  componentName: 'LayerSwitching3d',
  config: {
    property: {
      componentStyle: window._adoPremise.uc.theme,
      menuList: [],
      recordStatus: true,
    },
    data: {
      dataSourceType: 'staticData',
      dataSource: '',
      apiCode: '',
      redisKey: '',
      params: [],
      tableData: [
        {
          field: 'label',
          mapping: 'LABEL',
          explain: '名称',
        },
        {
          field: 'layersCode',
          mapping: 'LAYERESCODE',
          explain: '图层编码',
        },
      ],
      autoRefresh: {
        switchEnable: false,
        actTypes: ['push', 'pull'],
        actType: 'push',
        interval: 300,
        frequencyType: '',
      },
    },
    linkage: {},
  },
  events: [
    {
      id: 'd85c0001-0001-4346-9b7a-1b7f04c8523r',
      key: 'Metamap_Event_ChangeLayer',
      label: '点击事件',
      type: 'out',
      extraTpye: 'fieldName',
      description: '',
      parameters: [
        {
          id: 'f9d7f710-1230-45b1-bb87-7bcb8bec99e4',
          key: 'Metamap_Event_ChangeLayer',
          label: $demoi18n('panelEvent.label.eventKey'),
          value: '',
        },
        {
          id: 'dd788002-bpc2-4a32-a602-469090969e2i',
          key: EMIT_PARAMS_OBJ,
          label: '发出参数对象',
          hide: true,
          value: '',
        },
      ],
    },
    {
      id: '5ad60fef-69df-47a1-a409-b1d7ab4f9533',
      key: 'xv-page-container-change-url',
      label: '点击事件',
      type: 'out',
      extraTpye: 'fieldName',
      description: '',
      parameters: [
        {
          id: '26e78f5a-b1db-46e7-8895-a63b6d342dc9',
          key: 'xv-page-container-change-url',
          label: $demoi18n('panelEvent.label.eventKey'),
          value: '',
        },
        {
          id: '82e55fdf-2175-4ef8-9520-bc2a9966665f',
          key: EMIT_PARAMS_OBJ,
          label: '发出参数对象',
          hide: true,
          value: '',
        },
      ],
    },
    ...extraConfigEvent,
  ],
};
